<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>博文列表</title>
	<link rel="stylesheet" href="/Public/Admin/Css/common.css" />
	<script type="text/javascript" src='/Public/Admin/Js/jquery-1.8.2.min.js'></script>
	<script type="text/javascript" src='/Public/Admin/Js/common.js'></script>
</head>
<body>
	<div class='status'>
		<span>博文检索</span><?php if(ACTION_NAME != "index"): ?><div style="float: right;"><a href="<?php echo U('deleteAll');?>">清空回收站</a></div><?php endif; ?>
	</div>
	<div style='width:600px;text-align:center;margin : 20px auto;'>
		<form action="/yhsystem.php/Blog/index" method='get'>
			检索关键字：
			<input type="text" name='search'/>
			<input type="submit" value='' class='see'/>
		</form>
	</div>
	<table class="table">
		<?php if(isset($blog) && !$blog): ?><tr>
				<td align='center'>没有检索到相关的博文</td>
			</tr>
		<?php else: ?>
			<tr>
				<th>ID</th>
				<th>标题</th>
				<th>所属栏目</th>
				<th>点击次数</th>
				<th>发布时间</th>
				<th>操作</th>
			</tr>
			<?php if(is_array($blog)): foreach($blog as $key=>$v): ?><tr>
					<td width='20' align='center'><?php echo ($v["id"]); ?></td>
					<td><?php echo ($v["title"]); ?><strong style="color:<?php echo ($v["color"]); ?>"><?php if($v["a_name"]): ?>[<?php echo ($v["a_name"]); ?>]<?php endif; ?></strong></td>
					<td width='70' align="center"><?php echo ($v["c_name"]); ?></td>
					<td width="70" align="center"><?php echo ($v["click"]); ?></td>
					<td width='100' align='center'><?php echo (date('Y-m-d H:i', $v["time"])); ?></td>
					<td width='140' align='center'>
					<?php if(ACTION_NAME == "index"): ?><a href="<?php echo U('editBlog', array('id' => $v['id']));?>" class='edit'></a>
						<a href="<?php echo U('toTrach', array('id' => $v['id'],'del' => 1));?>" class='del'></a>
					<?php else: ?>
						<a href="<?php echo U('toTrach', array('id' => $v['id'],'del' => 0));?>">还原</a>｜
						<a href="<?php echo U('delete', array('id' => $v['id']));?>">彻底删除</a><?php endif; ?>
					</td>
				</tr><?php endforeach; endif; endif; ?>
	</table>
	<div class="page1"><?php echo ($page); ?></div>
</body>
</html>